package com.Brave.manager.Demo05;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Demo03 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCallable m = new MyCallable();

        FutureTask<String> ft = new FutureTask<>(m);

        Thread t1 = new Thread(ft, "进程1");


        t1.start();
        String str = ft.get();

        System.out.println(str);

    }
}
